public class lk5 {
    public static void main(String[] args) {
        String s = "sdif jas f  sfsd";
        StringBuffer sb =new StringBuffer(s);
        int n=sb.capacity();
        
        int n1=0;
        String u="%20";
        while(true){
            n1=sb.indexOf(" ");
            if(n1<=0){
                break;
            }else {
                sb.delete(n1, n1+1);
                sb.insert(n1,u);
            }
        }
        System.out.println(sb.toString());
        System.out.println(n);
        String a = sb.toString();
        System.out.println("!"+a+"!");
    }
    public String replaceSpace(String s) {
        StringBuffer sb =new StringBuffer(s);
        int n1=0;
        String u="%20";
        while(true){
            n1=sb.indexOf(" ");
            if(n1<0){
                break;
            }else {
                sb.delete(n1, n1+1);
                sb.insert(n1,u);
            }
        }
        String a = sb.toString();
        re
    //public String replaceSpace(String s) {
        
    //}
}
